1. Field of the Invention
The present invention relates to an image processor to be used for recognizing an object, such as a component, using a visual sensor, and more particularly to an image processor for recognizing the position and orientation of an object which could take various orientations based on images.
2. Description of the Related Art
In order to handle objects (e.g. components) which are not accurately positioned, using such an automatic machine as a robot, the position and orientation of the object must be recognized. A method, which has been used for this, is that an object is photographed using an image sensing means (camera) of the visual sensor, and the position and orientation of the object are recognized from the acquired image data. However, in actual operation, the range of the position and orientation for the object which can be taken, particularly the range of orientation, is wide in many cases, and in such a case, it is not easy to accurately recognize the position and orientation of the object.
For example, when many objects are scattered, the recognition of them is very difficult. A recognition method which could be used for such a case is capturing sample images of the objects in various different directions in advance, comparing and collating the partial image extracted from the input image at each location with each sample image by pattern matching, and extracting the partial image having high consistency with one of the sample images, and detecting the positions of the targets.
With this method, however, as the input image size and the number of sample images increase, the calculation time required for recognition increases proportionately, so this method is normally not practical. Therefore some methods for decreasing the calculation time have been proposed. One of them is a method called the “coarse-to-fine” method. This method does not search the entire input image at one pixel intervals, but searches the entire image at a rough pixel interval first to detect the rough position of the target, then searches the area around the rough position at a finer pixel interval to detect a more accurate position.
With this method as well, however, time reduction does not reach a practical level in many cases, so a method for decreasing the dimensions of comparison and collation by performing orthogonal transformation for each image before the comparison and collation can be applied. But if the coarseness of the search by the coarse-to-fine method is not changed for this application, the dimensions of orthogonal transformation influence the calculation time and extraction accuracy. In other words, if the dimensions of orthogonal transformation is uniformly decreased in each searching stage of the coarse-to-fine method, the calculation time decreases proportionally, but the extraction accuracy drops. On the contrary, if the extraction accuracy is attempted to be maintained at a certain or higher level, a lower limit of the dimensions of the orthogonal transformation is determined, and the limit of calculation time reduction is also determined.
Concerning the-present invention, pattern recognition using orthogonal transformation is disclosed in Japanese Patent Application Laid-Open No. H8-153198, but here nothing is referred to on how to apply the coarse-to-fine method to such a pattern recognition.